package com.campusbackend.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 通知详情VO
 * 
 * @author yezi
 * @since 2025-07-27
 */
@Data
@Schema(name = "NotificationDetailVO", description = "通知详情响应对象")
public class NotificationDetailVO {
    
    @Schema(description = "通知ID")
    private Long id;
    
    @Schema(description = "队伍ID")
    private Long teamId;
    
    @Schema(description = "队伍名称")
    private String teamName;
    
    @Schema(description = "发布者类型：1-教师，2-学生")
    private Byte publisherType;
    
    @Schema(description = "发布者ID")
    private Long publisherId;
    
    @Schema(description = "发布者姓名")
    private String publisherName;
    
    @Schema(description = "发布者头像")
    private String publisherAvatar;
    
    @Schema(description = "通知标题")
    private String title;
    
    @Schema(description = "通知内容")
    private String content;
    
    @Schema(description = "图片URL列表")
    private List<String> images;
    
    @Schema(description = "是否紧急：0-普通，1-紧急")
    private Byte isUrgent;
    
    @Schema(description = "是否需要确认：0-不需要，1-需要")
    private Byte requireConfirmation;
    
    @Schema(description = "队伍总成员数")
    private Integer totalMembers;
    
    @Schema(description = "已确认人数")
    private Integer confirmedCount;
    
    @Schema(description = "当前用户是否已确认")
    private Boolean isConfirmed;
    
    @Schema(description = "发布时间")
    private LocalDateTime createTime;
    
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    
    @Schema(description = "确认详情列表")
    private List<ConfirmationInfo> confirmations;

    @Schema(description = "未确认成员列表")
    private List<UnconfirmedMemberInfo> unconfirmedMembers;
    
    /**
     * 确认信息
     */
    @Data
    @Schema(name = "ConfirmationInfo", description = "确认信息")
    public static class ConfirmationInfo {
        @Schema(description = "确认者类型：1-教师，2-学生")
        private Byte confirmerType;
        
        @Schema(description = "确认者ID")
        private Long confirmerId;
        
        @Schema(description = "确认者姓名")
        private String confirmerName;
        
        @Schema(description = "确认者头像")
        private String confirmerAvatar;
        
        @Schema(description = "确认时间")
        private LocalDateTime confirmTime;
        
        @Schema(description = "确认备注")
        private String remark;
    }

    /**
     * 未确认成员信息
     */
    @Data
    @Schema(name = "UnconfirmedMemberInfo", description = "未确认成员信息")
    public static class UnconfirmedMemberInfo {
        @Schema(description = "成员类型：1-教师，2-学生")
        private Byte memberType;

        @Schema(description = "成员ID")
        private Long memberId;

        @Schema(description = "成员姓名")
        private String memberName;

        @Schema(description = "成员头像")
        private String memberAvatar;

        @Schema(description = "成员角色（如：队长、副队长等）")
        private String memberRole;
    }
}
